

#include "cpp/utility.hpp"

#include "catch.hpp"

#if 1



TEST_CASE("pair:basic")
{

	using namespace cpp;

	compressed_pair<int, float> a;

	compressed_pair<int, float> b;

	swap(a, b);

	REQUIRE(a == b);


	auto c = make_compressed_pair(10, 10.);
	auto d = make_compressed_pair(11, 10.);


	REQUIRE(c < d);
	REQUIRE(c <= d);


	REQUIRE(d > c);
	REQUIRE(d >= c);

	c = d;

	REQUIRE(c == d);

	c = std::move(d);

	REQUIRE(c == d);

	class A{};
	class B{};

	auto e = make_compressed_pair(A{}, A{});
	auto f = make_compressed_pair(A{}, B{});

	A aa;
	B bb;

	auto cf = make_compressed_pair(std::cref(aa), std::ref(bb));
}


#endif